Skip to main content

Open Game & Lobby

This API allows external platforms to seamlessly launch the Poker client, including both the lobby and individual game tables. The session is created via an API request, and the response includes a special URL that can be used to open the Poker interface.

The lobby URL can be opened in various ways depending on the integration setup: in a new browser window, the current window, or an iframe. On mobile devices, opening it in a new window is recommended for proper display.

Authentication options

This method can be used in the following ways:

  • With a valid request signature (if the client has a secret key);
  • By a user with ROLE_ADMIN;
  • By a user with permission to create an OpenGame session (CREATE, OpenGame).

Request URL

POST http(s)://API_URL/apiweb/v3/open-game?client={clientKey}


Request header (HTTP Header)

Parameter NameDescriptionOptional / Mandatory
signRequest signature. Can be mandatory if the client has a secret key; otherwise, it is optional.Optional / Mandatory
Content-TypeRequest format. Supported: application/vnd.api+jsonMandatory
acceptResponse format. Supported: application/vnd.api+jsonOptional

Request parameters

Parameter NameDescriptionOptional / Mandatory
session.idExternal session ID. Generated automatically if not specifiedOptional
session.authTypeAuthorization type: internal, external. Default: externalOptional
session.tableIdID of the table to open the session forOptional
session.langLanguage ISO codeOptional
session.launchOptionsCustom options embedded in the open session URLOptional
session.longLifeLoginTokenWhether to use a long-life login token. Default: trueOptional
session.userIpIP address of the playerOptional
player.idExternal player IDMandatory
player.nickPlayer’s nicknameOptional
player.namePlayer’s nameOptional
player.emailPlayer’s emailOptional
player.referralCodeReferral code of the refererOptional
player.bonusCodeBonus code of the affiliateOptional
player.phoneNumberPlayer’s phone numberOptional
player.tagPlayer’s tagOptional
player.activeWhether the account is activated. Default value may be configuredOptional
player.verifiedWhether the player is verified. Default value may be configuredOptional
player.trustedLevelID of the trusted levelOptional
player.preferredCurrencyPlayer’s preferred currency ISO codeOptional
player.preferredCurrencyPlayer’s country ISO code (Note: appears duplicated in source)Optional

Possible launch options:

Option NameDescription
restoreSessionUrlURL to your server. If the session expires in the HTML5 application, the player is redirected here for login. After login, a new session should be created, and the player should be redirected to the given URL.

Here are the values for optional parameters required to open various parts of client application:

Poker lobby

  • authType = internal or external
  • launchOptions = {...} (optional)

Poker table

  • authType = internal or external
  • tableId = [table ID]
  • launchOptions = {...} (optional)

Request example

{
"data": {
"type": "OpenGame",
"attributes": {
"session": {
"id": "someSessionId",
"authType": "external",
"tableId": 10,
"lang": "en",
"userIp": "12.3.4.2",
"launchOptions": {
"customOption1": "value1",
"customOption2": "value2"
},
"longLifeLoginToken": true
},
"player": {
"id": "1",
"nick": "nick",
"preferredCurrency": "USD",
"email": "[email protected]"
}
}
}
}

Response parameters

Parameter NameDescriptionOptional / Mandatory
playerIdExternal player IDMandatory
sessionIdGenerated or provided session IDMandatory
authAuthorization tokenMandatory
urlURL to open the Poker lobbyMandatory

Response example

{
"data": {
"id": "/apiweb/v3/.well-known/genid/8208f4ffb5067d2fd251",
"type": "GameSession",
"attributes": {
"playerId": "9",
"sessionId": "EXTA35A74BB190D1C46392E32524AF7277C",
"auth": "EB2FAA7C1581DCF80D9FC2EB255FEB98",
"url": "https://evenbet.pokerserversoftware.com/html5/?auth=EB2FAA7C1581DCF80D9FC2EB255FEB98&lang=en"
}
}
}

Errors returned

HTTP CodeMessageDescription
400Not valid requestIncorrect request signature
422Auth type not validauthType parameter value is given but it does not match any of the possible values
Currency cannot be blankParam 'currency' is required but was not sent. An error may occur only if param 'currency' was configured as mandatory.
Currency not foundCurrency with ISO code sent was not found. An error may occur only if param 'currency' was configured as mandatory.
This currency is not activeCurrency with ISO code sent is not active. An error may occur only if param 'currency' was configured as mandatory.
A Player with this username already exists in the system.User with this nickname is already registered in the system
The maximum username length is XMaximum length of nickName is exceeded